From: GRUB Maintainers Date: Wed, 23 Sep 2026 20:39:45 +0000 (+0100) Subject: fix-for-gcc-2.16-1 X-Git-Tag: archive/raspbian/2.14-4+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=80ee5e0a284cd7ddd263ddf3ee5bcedcbf8e9733;p=grub2.git fix-for-gcc-2.16-1 commit 9f4a586f1227a8287e1d6acd95893f6098756ee2 Author: Nicholas Vinson Date: Tue Feb 24 19:48:41 2026 -0500 util/probe: Save strrchr() ret val to const data ptr With glibc-2.43 implementing the C23 standard, strrchr() now returns "const char *" when its first argument is "const char *". The fix is update all pointers receiving strrchr()'s return value so that they are now "const char *" instead of "char *". Signed-off-by: Nicholas Vinson Reviewed-by: Daniel Kiper Gbp-Pq: Topic upstream Gbp-Pq: Name fix-for-gcc-2.16-1.patch --- diff --git a/util/probe.c b/util/probe.c index 81d91cf..a9158d6 100644 --- a/util/probe.c +++ b/util/probe.c @@ -70,7 +70,7 @@ char * grub_util_guess_bios_drive (const char *orig_path) { char *canon; - char *ptr; + const char *ptr; canon = grub_canonicalize_file_name (orig_path); if (!canon) return NULL; @@ -99,7 +99,7 @@ char * grub_util_guess_efi_drive (const char *orig_path) { char *canon; - char *ptr; + const char *ptr; canon = grub_canonicalize_file_name (orig_path); if (!canon) return NULL; @@ -128,7 +128,7 @@ char * grub_util_guess_baremetal_drive (const char *orig_path) { char *canon; - char *ptr; + const char *ptr; canon = grub_canonicalize_file_name (orig_path); if (!canon) return NULL;